const avenirmq = require('avenirmq');

async function main() {
    avenirmq.init({ ip: '127.0.0.1', port: '52013' });
    let res = await avenirmq.login({
        name: "test",
        password: '11111111'
    });
    console.log("res = ", res);
    let sign = res.sign;
    await avenirmq.receive({
        ip: '127.0.0.1',
        port: '13000',
    }, cout);
    await avenirmq.send({a:'123'},sign);
   

}

function cout(data) {
    console.log('data :>> ', data);
}

main();
